Skip to content

Conversation

smoelius
Copy link
Contributor

@smoelius smoelius commented Jan 29, 2022

Not realizing it was already obsolete, I built a tool to format inside if_chain invocations.

This PR applies the tool to clippy_utils. (If you apply it to clippy_lints, the changes are extensive.)

Anyway, I'm making it known here in case anyone wants to use it while if-let chain support is developed for rustfmt. (There could be a few Clippy PRs between now and then, and IMHO, the code looks better with the if_chain invocations formatted.)

Cheers.


changelog: none

@rust-highfive
Copy link

r? @flip1995

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 29, 2022
@flip1995
Copy link
Member

flip1995 commented Feb 1, 2022

Thanks! This is an improvement of the formatting. Probably not necessary soon, once we switch to let_chains, but until we can make the move, I'm happy to merge this.

@bors r+

@bors
Copy link
Contributor

bors commented Feb 1, 2022

📌 Commit e7922f7 has been approved by flip1995

bors added a commit that referenced this pull request Feb 1, 2022
Format `if_chain` invocations in clippy_utils

Not realizing it was [already obsolete](#8360), I built a [tool to format inside `if_chain` invocations](https://crates.io/crates/rustfmt_if_chain).

This PR applies the tool to clippy_utils. (If you apply it to clippy_lints, the changes are extensive.)

Anyway, I'm making it known here in case anyone wants to use it while `if-let` chain support is developed for `rustfmt`. (There could be a few Clippy PRs between now and then, and IMHO, the code looks better with the `if_chain` invocations formatted.)

Cheers.
@bors
Copy link
Contributor

bors commented Feb 1, 2022

⌛ Testing commit e7922f7 with merge 5c3f1e6...

@bors
Copy link
Contributor

bors commented Feb 1, 2022

💔 Test failed - checks-action_test

@xFrednet
Copy link
Contributor

xFrednet commented Feb 1, 2022

The changelog entry was missing. I added changelog: none as this PR only changed some formatting :)

@bors retry

@bors
Copy link
Contributor

bors commented Feb 1, 2022

⌛ Testing commit e7922f7 with merge cf53710...

@bors
Copy link
Contributor

bors commented Feb 1, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing cf53710 to master...

@bors bors merged commit cf53710 into rust-lang:master Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants